<%@page import="com.astrocsr.common.Constants"%>
<%@ taglib prefix="s" uri="/struts-tags"%>

<script type="text/javascript">

	$(document).ready(function() {
		
		
		
		$("#pwdValidationParamForm").validate({
		    
	        // validation rules
	        rules: {
	        	'parametersInfo.paramValue' : { required : true}
	        },
	        messages: {
	        	
	        	'parametersInfo.paramValue':
                {
                    required: "The value is required",
                }
	        },
	        
	        submitHandler: function(form) {
	            form.submit();
	        }
	    });
		
		
		$("#pwdHistParamForm").validate({
	        rules: {
	        	'parametersInfo.paramValue' : { required : true, number: true},
	        	
	        },
	        messages: {
	        	'parametersInfo.paramValue': { required: "the value is required", number:   "The value is number only"}
	        },
	        submitHandler: function(form) {
	            form.submit();
	        }
	    });
		
		$("#customerMaxBadAttemptsParamForm").validate({
	        rules: {
	        	'parametersInfo.paramValue' : { required : true, number: true, min : 1}
	        },
	        messages: {
	        	'parametersInfo.paramValue': { required: "the value is required", number:   "The value is number only", min: "The value must be greater than 0"}
	        },
	        submitHandler: function(form) {
	            form.submit();
	        }
	    });

		$("#pwdExpiredDaysParamForm").validate({
	        rules: {
	        	'parametersInfo.paramValue' : { required : true, number: true, min : 1}
	        },
	        messages: {
	        	'parametersInfo.paramValue': { required: "the value is required", number:   "The value is number only", min: "The value must be greater than 0"}
	        },
	        submitHandler: function(form) {
	            form.submit();
	        }
	    });
		
	}); 

</script>

<br/>
<h1><b>Admin Module - Password Configuration Setting</b></h1>


<form id="pwdValidationParamForm" action='<s:url action="technical/createParameter"/>' method="post">
	<input type="hidden" name="parametersInfo.paramCode"  value="<%=Constants.PARAM_PASSWORD_REG_EXPR%>"/>
<div id="fullTableContent">
<div id="mainTableContent">
<div class="tableWrap">
<table class="tabularData" width="90%" border="0">
	<thead class="th1">
		<tr>
			<th colspan="5">
				<div class="sectionTableTitle">
					<h2>Password Regular Expression Configuration Setting</h2>
				</div>
			</th>
		</tr>
	</thead>

	<thead class="th2">
		<tr>
			<th width="90%" nowrap="nowrap" align="left" colspan="2">Enter The Password Regular Expression Rule Below and click "SAVE" to proceed</th>
		</tr>
	</thead>

	<tr class='even'>
		<td nowrap='nowrap' width="10%" class='left'>Enter Password Regular Expression Rule : &nbsp;&nbsp;&nbsp;&nbsp;
			<input type="text" name="parametersInfo.paramValue" size="50" value="" id="regExpPwdRule"></td>
		<td nowrap='nowrap' class='left'>
			<input type="submit" style="width: 100px" value="SAVE" style="width: 100px"/></td>
	</tr>

	<tr class='even'>
		<td colspan="2">
			<s:if test="%{parametersInfo1 != null && parametersInfo1.paramValue != null}">
				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				Current Setting : <s:property value="parametersInfo1.paramValue"/>
			</s:if>
		</td>
	</tr>

	<tr>
		<td nowrap='nowrap' align="left" clospan="2">
			Note: For guidance, please refer this URL: http://www.roblocher.com/technotes/regexp.aspx
		</td>
	</tr>
</table>
</div>
</div>
</div>
<br/>
</form>
<form id="pwdHistParamForm" action="<s:url action="technical/createParameter"/>" method="post">
	<input type="hidden" name="parametersInfo.paramCode"  value="<%=Constants.PARAM_TOTAL_PASSWORD_HIST%>"/>
<div id="fullTableContent">
<div id="mainTableContent">
<div class="tableWrap">

<table class="tabularData" width="90%" border="0">
	<thead class="th1">
		<tr>
			<th colspan="5">
				<div class="sectionTableTitle">
					<h2>Password History Configuration</h2>
				</div>
			</th>
		</tr>
	</thead>

	<thead class="th2">
		<tr>
			<th width="95%" nowrap="nowrap" align="left" colspan="2">Enter the numbers of PASSWORD HISTORY needed to be stored and click "SAVE" to proceed</th>
		</tr>
	</thead>

	<tr class='even'>
		<td nowrap='nowrap' width="10%" class='left'>Enter number of Password History needed : &nbsp;&nbsp;&nbsp;&nbsp;
			<input type="text" name="parametersInfo.paramValue" size="5" value="" id="tPwdHist"></td>
		<td nowrap='nowrap' class='left'>
			<input type="submit" style="width: 100px" value="SAVE" style="width: 100px"/>
			<s:if test="%{parametersInfo2 != null && parametersInfo2.paramValue != null}">
				&nbsp;&nbsp;&nbsp;&nbsp; Current Setting : <s:property value="parametersInfo2.paramValue"/>
			</s:if>
		</td>
	</tr>
</table>
</div>
</div>
</div>
<br/>
</form>

<!-- Start CustomerMaxBadAttempts -->
<form id="customerMaxBadAttemptsParamForm" action="<s:url action="technical/createParameter"/>" method="post">
	<input type="hidden" name="parametersInfo.paramCode"  value="<%=Constants.PARAM_PWD_BAD_ATTEMP%>"/>
	<div id="fullTableContent">
	<div id="mainTableContent">
	<div class="tableWrap">
	
	<table class="tabularData" width="90%" border="0">
		<thead class="th1">
			<tr>
				<th colspan="5">
					<div class="sectionTableTitle">
						<h2>Password Bad Attempt Count Configuration</h2>
					</div>
				</th>
			</tr>
		</thead>
	
		<thead class="th2">
			<tr>
				<th width="95%" nowrap="nowrap" align="left" colspan="2">Enter the numbers of Password Bad Attempt Count Configuration needed to be stored and click "SAVE" to proceed</th>
			</tr>
		</thead>
	
		<tr class='even'>
			<td nowrap='nowrap' width="10%" class='left'>Enter number of Password Bad Attempt Count Configuration needed : &nbsp;&nbsp;&nbsp;&nbsp;
				<input type="text" name="parametersInfo.paramValue" size="5" value=""></td>
			<td nowrap='nowrap' class='left'>
				<input type="submit" style="width: 100px" value="SAVE" style="width: 100px"/>
				<s:if test="%{parametersInfo3 != null && parametersInfo3.paramValue != null}">
					&nbsp;&nbsp;&nbsp;&nbsp; Current Setting : <s:property value="parametersInfo3.paramValue"/>
				</s:if>
			</td>
		</tr>
	</table>
	</div>
	</div>
	</div>
	<br/>
</form>
<!-- End CustomerMaxBadAttempts -->

<!-- Start PwdExpiredDays -->
<form id="pwdExpiredDaysParamForm" action="<s:url action="technical/createParameter"/>" method="post">
	<input type="hidden" name="parametersInfo.paramCode"  value="<%=Constants.PARAM_PWD_EXPIRED_DAYS%>"/>
	<div id="fullTableContent">
	<div id="mainTableContent">
	<div class="tableWrap">
	
	<table class="tabularData" width="90%" border="0">
		<thead class="th1">
			<tr>
				<th colspan="5">
					<div class="sectionTableTitle">
						<h2>Password Expired Days Configuration</h2>
					</div>
				</th>
			</tr>
		</thead>
	
		<thead class="th2">
			<tr>
				<th width="95%" nowrap="nowrap" align="left" colspan="2">Enter the numbers of Password Expired Days Configuration needed to be stored and click "SAVE" to proceed</th>
			</tr>
		</thead>
	
		<tr class='even'>
			<td nowrap='nowrap' width="10%" class='left'>Enter number of Password Expired Days Configuration needed : &nbsp;&nbsp;&nbsp;&nbsp;
				<input type="text" name="parametersInfo.paramValue" size="5" value=""></td>
			<td nowrap='nowrap' class='left'>
				<input type="submit" style="width: 100px" value="SAVE" style="width: 100px"/>
				<s:if test="%{parametersInfo4 != null && parametersInfo4.paramValue != null}">
					&nbsp;&nbsp;&nbsp;&nbsp; Current Setting : <s:property value="parametersInfo4.paramValue"/>
				</s:if>
			</td>
		</tr>
	</table>
	</div>
	</div>
	</div>
	<br/>
</form>
<!-- End CustomerMaxBadAttempts -->
<div id="fullTableContent">
<div id="mainTableContent">
<div class="tableWrap">

</div>
</div>
</div>
<br/><br/>

